<?php

/**
 * 后台环境页
 * @copyright (c) 2013, Mr.Wang
 * 
 */
class CaiAction extends AdminAction {

    function update() {
        $this->model = M("Cai");

        $temp = array(
            "shop_id" => $_POST['id'],
            "status"  => $_POST['status'],
        );
        $_POST    = $temp;
        if ($this->model->create()) {
            if ($this->model->save()) {
                $this->success("修改成功！", __SELF__);
            } else {
                $this->error("修改失败！");
            }
        } else {
            $this->error($this->model->getError());
        }
    }

}


